import request from '@/utils/request'
import axios from 'axios'

export function chargeMoney(data){
  return axios.get('http://localhost:8096/ygAdminUser/chargeMoney', {
    params: data
  })
}

export function fetchList(query) {
  /* return request({
    url: '/ygAdminUser/selUserList',
    method: 'get',
    params: query
  })*/
  /* return request({
    url: '/user/list2',
    method: 'get',
    params: query
  })*/
  return axios.get('http://localhost:8096/ygAdminUser/selUserList', {
    params: query
  })
}

export function tfetchList(query) {
  return request({
    url: '/user/list2',
    method: 'get',
    params: query
  })
  /* return request({
    url: '/user/list2',
    method: 'get',
    params: query
  })*/
}
export function userDetail(id) {
  return request({
    url: '/user/detail',
    method: 'get',
    params: { id }
  })
}

export function updateUser(data) {
 // console.log(data)
 return axios.get('http://localhost:8096/ygAdminUser/userUpdata', {
   params: data
 })
}

export function listAddress(data) {
  return request({
    url: '/YgAdminAddress/seleAll',
    method: 'get',
    params: data
  })
	// return axiosget('http://localhost:8096/ygAdminAddress/selAll',{
	// 	params: data
	// })
}

export function listCollect(query) {
  return request({
    url: '/collect/list',
    method: 'get',
    params: query
  })
}

export function listFeedback(query) {
  return request({
    url: '/feedback/list',
    method: 'get',
    params: query
  })
}

export function listFootprint(query) {
  return request({
    url: '/footprint/list',
    method: 'get',
    params: query
  })
}

export function listHistory(query) {
  return request({
    url: '/history/list',
    method: 'get',
    params: query
  })
}
